package com.ming.mq.simple;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class SimpleMQReceiver {
    // 定义消费者,指定队列名称
    @RabbitListener(queues = SimpleConfig.SIMPLEQUEUE)
    public void receive(Object msg){
        log.info("direct-接收消息:{}",msg);
    }
}
